function jsShoe(_deckCount)
{
	this.m_nDeckCount=_deckCount;
	this.m_szID = "Shoe";
	this.m_aCards = null;
	this.m_aDecks = new Array();
	
	
	this.shuffle = _jsShoeShuffle;
	
	jsShoe.prototype.toString = _jsShoeToString;
	//initialize the decks
	for(var ia=0;ia<_deckCount;ia++)
	{
		this.m_aDecks.push(new jsDeck(ia));
	}
	
	//shuffle
	this.shuffle();
}

function _jsShoeShuffle()
{
	this.m_aCards = new Array();
	//throw all cards in temp array
	var tmp = new Array();
	for(var ia=0;ia<this.m_nDeckCount;ia++)
	{
		tmp = tmp.concat(this.m_aDecks[ia].m_aCards);
	}
	var _tmpId = 0;
	while(tmp.length>0)
	{
		_tmpId = Math.floor(Math.random()*tmp.length);
		this.m_aCards.push(tmp[_tmpId]);
		tmp.splice(_tmpId,1);
	}
}

function _jsShoeToString()
{
	return "Shoe: " + this.m_aCards.length + " Left<br/>";
}